#pragma once

#include "EventManager.h"
#include "Geometry.h"

struct Event_Mouse_Down : public BaseEvent
{
	explicit Event_Mouse_Down(int button)
		: m_button(button)
	{
	}

	int m_button;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};

struct Event_Mouse_Up : public BaseEvent
{
	explicit Event_Mouse_Up(int button)
		: m_button(button)
	{
	}

	int m_button;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};

struct Event_Mouse_Move : public BaseEvent
{
	explicit Event_Mouse_Move(const Vec2& pos, const Vec2& lastpos)
		: m_position(pos), m_lastPosition(lastpos)
	{
	}

	Vec2 m_position;
	Vec2 m_lastPosition;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};

struct Event_Mouse_Motion : public BaseEvent
{
	explicit Event_Mouse_Motion(double deltax, double deltay)
		: m_deltaX(deltax), m_deltaY(deltay)
	{
	}
	
	double m_deltaX, m_deltaY;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};

struct Event_Key_Down : public BaseEvent
{
	explicit Event_Key_Down(char key)
		: m_key(key)
	{
	}

	char m_key;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};

struct Event_Key_Up : public BaseEvent
{
	explicit Event_Key_Up(char key)
		: m_key(key)
	{
	}

	char m_key;

	static const EventType sk_eventType;
	virtual const EventType& VGetEventType(void) const
	{
		return sk_eventType;
	}
};